import axios from '@/http/axios'
export default{
    namespaced:true,
    state:{
        allOrderData:{},
        unpayOrderData:{},
        unsendOrderData:{},
        waitOrderData:{},
        serviceOrderData:{},
        comfirmedOrderData:{},
        offOrderData:{}
    },
    getters:{},
    mutations:{
        setAllOrderData(state,data){
            state.allOrderData=data
        },
        setUnpayOrderData(state,data){
            state.unpayOrderData=data
        },
        setUnsendOrderData(state,data){
            state.unsendOrderData=data
        },
        setWaitOrderData(state,data){
            state.waitOrderData=data
        },
        setServiceOrderData(state,data){
            state.serviceOrderData=data
        },
        setComfirmedOrderData(state,data){
            state.comfirmedOrderData=data
        },
        setOffOrderData(state,data){
            state.offOrderData=data
        },
    },
    actions:{
        async toLoadAllOrderData(context,params){
            let res = await axios.post('/order/queryPage',params)
            context.commit('setAllOrderData',res.data.data)
        },
        async toLoadUnpayOrderData(context,params){
            let res = await axios.post('/order/queryPage',params)
            context.commit('setUnpayOrderData',res.data.data)
        },
        async toLoadUnsendOrderData(context,params){
            let res = await axios.post('/order/queryPage',params)
            context.commit('setUnsendOrderData',res.data.data)
        },
        async toLoadWaitOrderData(context,params){
            let res = await axios.post('/order/queryPage',params)
            context.commit('setWaitOrderData',res.data.data)
        },
        async toLoadServiceOrderData(context,params){
            let res = await axios.post('/order/queryPage',params)
            context.commit('setServiceOrderData',res.data.data)
        },
        async toLoadComfirmedOrderData(context,params){
            let res = await axios.post('/order/queryPage',params)
            context.commit('setComfirmedOrderData',res.data.data)
        },
        async toLoadOffOrderData(context,params){
            let res = await axios.post('/order/queryPage',params)
            context.commit('setOffOrderData',res.data.data)
        },

    }
}